<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="gamble.qna.vo.BoardVO"%>
<%@page import="gamble.qna.vo.PageVO"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>게시판 글쓰기</title>
</head>

<body bgcolor="#084B8A"> 

<%
%>
  <form name="frm" action="write.js" method="POST"
    enctype="multipart/form-data">
   <table width="740" bgcolor="#084B8A" bordercolor="#FFFACD" style="border-collapse:collapse;" border="1">
       <tr>
         <th width="200"><font color="#F6CECE">제목</font></th>
         <td align="center">       
         <c:choose>
         <c:when test="${vo==null}">    
          
            <font color="#F6CECE"><input type="text" name="subject" size="71" /></font>
         </c:when>
         
         <c:otherwise>        
           <font color="#FBF5EF">답변:</font>
           <input type="text" name="subject" 
                  value="${vo.subject}" size="59"/>
           <input type="hidden" name="num" value="${vo.num}"/>
           <input type="hidden" name="ref" value="${vo.ref}"/>
           <input type="hidden" name="re_step" value="${vo.re_step}"/>
           <input type="hidden" name="re_level" value="${vo.re_level}"/>
           <input type="hidden" name="currentPage" value="${pv.currentPage}" />   
                
        </c:otherwise>
         </c:choose>
         
         </td>
       </tr>
   
       <tr>
         <th><font color="#F6CECE">글쓴이</font></th>
         <td align="center"><input type="text" name="writer" size="65"/></td>
       </tr>
       
       <tr>
         <th><font color="#F6CECE">비밀번호</font></th>
         <td align="center"><input type="password" name="passwd" size="65"/></td>
         
       </tr>
       
       <tr>
         <th><font color="#F6CECE">이메일</font></th>
         <td align="center"><input type="text" name="email" size="65"/></td>
       </tr>
       
       
       
       <tr>
        <th><font color="#F6CECE">내용</font></th>
        <td align="center"><textarea name="content" rows="10" cols="55"></textarea></td>
       </tr>
       
       <tr>
      <td align="center"><font color="#F6CECE">파일첨부</font></td>
      <td align="center"><input type="file" size="54" name="upload"/></td>
      
     </tr>  
     
       <tr>
        <td colspan="2" align="center">
           
           <input type="submit" value="글쓰기"/>
          <input type='button' value='취소' onclick="location.href='list.js'">
        </td>
       </tr>
       
     
   </table>
  </form>
</body>
</html>